<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.s1{
		font-size:60px;
	}
	.s2{
		color:red;
	}
	.s3{
		font-style: italic;
	}
</style>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
	$(function(){
		$("#b1").click(function(){
			//$('#d1').attr('class','s1');
			
			//$('#d1').attr('style','background-color:red');
			
			//$('#d1').addClass('s1 s2');
			//$('#d1').removeClass('s1');
		
			$('#d1').toggleClass('s3');
		});
	});
</script>
</head>
<body>
	<div id="d1" class="s3">Hello jQuery</div>
	<input type="button" value="点击" id="b1"/>
</body>
</html>